﻿using Cemit.PolyProto;
using Google.Protobuf;
using Google.Protobuf.Collections;
using System;
using System.Collections.Generic;
using System.Text;

namespace Cemit.PolyServer.Game
{
    /// <summary>表示一个操作帧</summary>
    class OperationFrame
    {
        /// <summary>格式：playerId:operation</summary>
        private readonly F msg;

        public OperationFrame(int index)
        {
            msg = new F
            {
                Index = index
            };
        }

        public void Add(string playerId, string operation)
        {
            msg.Operation.Add(playerId + ":" + operation);
        }

        public F ToMsg()
        {
            return msg;
        }
    }
}
